package org.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class FilterTest2 implements Filter{

	public void init(FilterConfig filterConfig) throws ServletException {
		System.out.println(">>>test_filter项目。。。初始化FilterTestB过滤器.。。。");
	}

	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		HttpServletRequest servletRequest = (HttpServletRequest) request;
		HttpServletResponse servletResponse = (HttpServletResponse) response;
		System.out.println(">>>test_filter项目。。。FilterTestB过滤之前。。。");
		chain.doFilter(servletRequest, servletResponse);
		System.out.println(">>>test_filter项目。。。FilterTestB过滤之后。。。");
	}

	public void destroy() {
		System.out.println(">>>test_filter项目。。。FilterTestB过滤器销毁。。。");
	}


}
